(function(angular) {
	'use strict';
	angular.module("fs.router").config([ 'routerServiceProvider', function(routerServiceProvider) {
		var simpleConfig = {
			'test' : {
				'pti' : {
					'dialogs' : null,
					'format' : null,
					'fileUpload' : null,
					'complexTable' : {
						'__dependentFiles' : [],
						'__layoutConfig' : 'do/cda/layout/sampleCompany/list',
						'__i18nConfig' : 'do/cda/resource/sampleCompany/list',
						'__authorizationConfig' : 'do/cda/authorization/sampleCompany/list',
						'__validatorConfig' : 'do/cda/validator/sampleCompany/list'
					},
					'limit' :{ 
						'__multipleViews' : true, 
						'__dependentFiles' : ['abnTree', 
                              'waf/view/${theme}/test/pti/ptiLimitController.js', 
                              'waf/view/${theme}/test/pti/limit/limitListController.js',
                              'waf/view/${theme}/test/pti/limit/limitViewController.js',
                              'waf/view/${theme}/test/pti/limit/limitEditController.js'],
						list : { 
							views : { 
								list:{ 
									templateUrl : 'waf/view/${theme}/test/pti/limit/limitList.html' 
								} 
							} 
						}, 
						view : { 
							views : { 
								view:{
									templateUrl : 'waf/view/${theme}/test/pti/limit/limitView.html' 
								} 
							} 
						}, 
						edit : { 
							views : { 
								edit:{ 
									templateUrl : 'waf/view/${theme}/test/pti/limit/limitEdit.html' 
								} 
							} 
						} 
					}
				},
				'bootstrap' : {
					'accordion' : {
						'demo' : null
					},
					'alert' : {
						'demo' : null
					},
					'buttons' : {
						'demo' : null
					},
					'collapse' : {
						'demo' : null
					},
					'dateparser' : {
						'demo' : null
					},
					'datepicker' : {
						'demo' : null
					},
					'timepicker' : {
						'demo' : null
					},
					'datepickerPopup' : {
						'demo' : null
					},
					'dropdown' : {
						'demo' : null
					},
					'modal' : {
						'demo' : null
					},
					'position' : {
						'demo' : null
					},
					'progressbar' : {
						'demo' : null
					},
					'tabs' : {
						'demo' : null
					},
					'tooltip' : {
						'demo' : null
					},
					'typeahead' : {
						'demo' : null
					},
					'tree' : {
						'demo' : {
							'__dependentFiles' : [ 'abnTree' ]
						}
					},
					'contextmenu' : {
						'demo' : {
							'__dependentFiles' : [ 'contextMenu' ]
						}
					}
				}
			}
		};
		
		var originalConfig = {
			'waf_test_pti_limit' : {
				url : '/waf/test/pti/limit',
				templateUrl : routerServiceProvider.getTemplateUrl('waf/view/${theme}/test/pti/ptiLimit.html'),
				controller : 'waf.test.pti.limitController',
				controllerAs : 'vm',
				resolve : {
					dependencis : routerServiceProvider.lazyLoad(['abnTree', 
					                                              'waf/view/${theme}/test/pti/ptiLimitController.js', 
					                                              'waf/view/${theme}/test/pti/limit/limitListController.js',
					                                              'waf/view/${theme}/test/pti/limit/limitViewController.js',
					                                              'waf/view/${theme}/test/pti/limit/limitEditController.js']),
				    layoutConfig : routerServiceProvider.preLoadLayoutConfig('do/waf/layout/limit/limitHome'),
				    i18nConfig : routerServiceProvider.preLoadI18nConfig('do/waf/layout/resource/limitHome'),
				    validatorConfig : routerServiceProvider.preLoadValidatorConfig('do/waf/validator/limit/limitHome'),
				    authService : routerServiceProvider.preLoadAuthorizationConfig('do/waf/authorization/limit/limitHome')
				}
			},
			'waf_test_pti_limit.list' : {
				url : '/list',
				views : {
					list : {
						templateUrl : 'waf/view/DEFAULT/test/pti/limit/limitList.html',
						controller : 'waf.test.pti.limit.listController',
						controllerAs : 'vm'
					}
				}
			},
			'waf_test_pti_limit.view' : {
				url : '/view',
				views : {
					view : {
						templateUrl : 'waf/view/DEFAULT/test/pti/limit/limitView.html',
						controller : 'waf.test.pti.limit.viewController',
						controllerAs : 'vm'
					}
				}
			},
			
			'waf_test_pti_limit.edit' : {
				url : '/edit',
				views : {
					edit : {
						templateUrl : 'waf/view/DEFAULT/test/pti/limit/limitEdit.html',
						controller : 'waf.test.pti.limit.editController',
						controllerAs : 'vm'
					}
				}
			}
		};
		routerServiceProvider.setSimpleStates(simpleConfig, 'waf');
		//routerServiceProvider.setStates(originalConfig);
	} ]);
})(angular);